PARAMETER   epsilon /1e-8/;

VARIABLE
    npv, lambda11, lambda12, lambda21, lambda22;

BINARY VARIABLES
    x1, x2, z11, z12, z21, z22;

POSITIVE VARIABLES
    y11, y12, y21, y22, yc11, yc12, yc21, yc22, c1, c2, dc1, dc2, mu11, mu12, 
    mu21, mu22, s1, s2, sc1, sc2;

EQUATIONS
    obj, con1, con2, con3, con4, con5, con6, con7, con8, con9, con10, con11,
    con12, con13, con14, con15, con16, con17, con18, con19, con20, con21,
    con22, con23, con24;

obj..   npv =e= 2.0*(y11+y12+y21+y22)-10.0*x1-9.0*x2-1.1*dc1-0.9*dc2-0.6*c1
                -0.6*c2-0.1*y11-0.1*y12-0.2*y21-0.2*y22;
con1..  0.0 =e= y11+y21-c1+s1;
con2..  0.0 =e= y12+y22-c2+s2;
con3..  c1 =e= dc1;
con4..  c2 =e= c1+dc2;
con5..  dc1 =l= 50.0*x1;
con6..  dc2 =l= 50.0*x2;
con7..  y11+yc11 =e= 30.0;
con8..  y12+yc12 =e= 35.0;
con9..  y21+yc21 =e= 32.0;
con10.. y22+yc22 =e= 38.0;
con11.. yc11+yc21-20.0+sc1 =e= 0.0;
con12.. yc12+yc22-20.0+sc2 =e= 0.0;
con13.. mu11*s1 =e= epsilon;
con14.. mu12*s2 =e= epsilon;
con15.. mu21*sc1 =e= epsilon;
con16.. mu22*sc2 =e= epsilon;
con17.. 2.0+mu11+lambda11 =e= 0.0;
con18.. 2.0+mu11+lambda21 =e= 0.0;
con19.. 2.0+mu12+lambda12 =e= 0.0;
con20.. 2.0+mu12+lambda22 =e= 0.0;
con21.. 2.1+mu21+lambda11 =e= 0.0;
con22.. 2.1+mu21+lambda21 =e= 0.0;
con23.. 2.1+mu22+lambda12 =e= 0.0;
con24.. 2.1+mu22+lambda22 =e= 0.0;

MODEL TEST /ALL/;
SOLVE TEST USING MINLP MAXIMIZING npv;
